package ru.amse.ilyin.gui.actions;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

import ru.amse.ilyin.gui.MainWindow;

/**
 * This action makes main window show package diagram.
 *
 * @author Alexander Ilyin
 */
public class PackageDiagramAction extends AbstractAction {
	private final MainWindow window;
	
	/**
	 * Creates an action by the specified main window.
	 * 
	 * @param window application main window
	 */
	public PackageDiagramAction(MainWindow window) {
		this.window = window;
		
		putValue(NAME, "Package diagram");
	}
	
	public void actionPerformed(ActionEvent e) {
		window.showPackageDiagram();
	}
}
